import Base64 from './base64'

/**
 *  工具类
 * */

  /**
   *  处理参数
   **/
  export default function(object,bol){
    var obj = {
      version:'v1',
      debug:'IAmAColdBloodedPassword'
    }

    for (var key in object) {
      if (bol){
        obj[key] = object[key]
        if (key=='unionid' || object['unionid']){
          delete obj.debug;
          obj[key] = Base64.decode(object[key])
        }
      } else {
        obj[key] = Base64.decode(object[key])
      }

    }
    return obj;
  }





